package com.ysy.wiki.controller;

import com.ysy.wiki.domain.Ebook;
import com.ysy.wiki.req.EbookReq;
import com.ysy.wiki.resp.CommonResp;
import com.ysy.wiki.resp.EbookResp;
import com.ysy.wiki.service.EbookService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EbookController {


    @Resource
    private EbookService EbookService;

    @GetMapping("/Ebook/list")
    public CommonResp list(EbookReq req){
        CommonResp<List<EbookResp>> resp =new CommonResp<>();

        List<EbookResp> list =EbookService.list(req);

        resp.setContent(list);
        return resp;
    }

}


